using System.Collections.Generic;
using System.Text;

namespace OracleInternal.SqlAndPlsqlParser.LocalParsing.Ansi
{
	internal class OracleLpTablePrimaryTablePrimaryElement : OracleLpTablePrimary
	{
		protected OracleLpName m_vAlias;

		protected OracleLpTablePrimaryElement m_vTablePrimaryElement;

		public OracleLpName Alias
		{
			get
			{
				return m_vAlias;
			}
			internal set
			{
				m_vAlias = value;
			}
		}

		public OracleLpTablePrimaryElement TablePrimaryElement
		{
			get
			{
				return m_vTablePrimaryElement;
			}
			set
			{
				m_vTablePrimaryElement = value;
				if (m_vTablePrimaryElement != null)
				{
					m_vTablePrimaryElement.Parent = this;
				}
			}
		}

		public override List<OracleLpColumnDescriptor> ColumnDescriptors => m_vTablePrimaryElement.ColumnDescriptors;

		public OracleLpTablePrimaryTablePrimaryElement(OracleLpStatementElement se)
			: base(se)
		{
			m_vTablePrimaryType = OracleLpTablePrimaryType.TablePrimaryElement;
		}

		public override void RetrieveNamedObjectReferences(OracleLpStatement statement)
		{
			m_vTablePrimaryElement.RetrieveNamedObjectReferences(statement);
		}

		internal override void ToString(StringBuilder sb)
		{
			string depthIndent = base.DepthIndent;
			sb.Append(depthIndent);
		}
	}
}
